package comxyp.service.impl;

import comxyp.domain.Employee;
import comxyp.mapper.EmployeeMapper;
import comxyp.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service("employeeService")
public class EmployeeServiceImpl implements EmployeeService {
    @Autowired
    private EmployeeMapper employeeMapper;
    public List<Employee> findAll() {
        return employeeMapper.findAll();
    }

    @Override
    public Employee findById(int emp_id) {
        return employeeMapper.findById(emp_id);
    }

    @Override
    public void adds(Employee employee) {
        employeeMapper.adds(employee);
    }

    @Override
    public void update(Employee employee) {
        employeeMapper.update(employee);
    }

    @Override
    public void delete(int emp_id) {
        employeeMapper.delete(emp_id);
    }

    @Override
    public void deleteAll(List<Integer> ids) {
        employeeMapper.deleteAll(ids);
    }

    @Override
    public boolean findName(String name) {
        return employeeMapper.findName(name);
    }

}
